﻿/*
 * Event.h
 */
//**************************************************
#undef DECLARE_EVENT_BEGIN
#undef DECLARE_EVENT_MEMBER
#undef DECLARE_EVENT_END


//**************************************************
#if defined(IMPLEMENT_EVENT)

#	define DECLARE_EVENT_BEGIN(className)	IMPLEMENT_RT_CREATOR(className)

#	define DECLARE_EVENT_MEMBER(type,name) 

#	define DECLARE_EVENT_END() 


//**************************************************
#elif defined(REGISTER_EVENT)

#	define DECLARE_EVENT_BEGIN(className)	REGISTER_RT_CREATOR(className)

#	define DECLARE_EVENT_MEMBER(type,name) 

#	define DECLARE_EVENT_END() 


//**************************************************
#else

//---------------------------------------------
#define DECLARE_EVENT_BEGIN(className) \
		typedef gdk::Unknown::Handle_T<class className> className##Ptr;\
		class className : public gdk::Event\
		{\
			DECLARE_CLASS_HANDLE(className)\
			DECLARE_CLASS_INSTANCE(className)\
			DECLARE_RT_CREATOR(className)\
		private:\
			className(void)\
			{}\
		public:

#define DECLARE_EVENT_MEMBER(type,name) \
			type name;

#define DECLARE_EVENT_END() \
		};


#ifndef __GDK_EVENT_H__
#define __GDK_EVENT_H__

#include <gdk/core/Types.h>
#include <gdk/core/Unknown.h>


namespace gdk
{

	//---------------------------------------------
	class GDK_CORE_EXPORT Event : public Unknown
	{
		DECLARE_CLASS_HANDLE(Event)
		DECLARE_CLASS_INSTANCE(Event)
		DECLARE_RT_CREATOR(Event)

	protected:
		__INLINE__ Event(void)
		{}
	};



}//namespace gdk


#endif //__GDK_EVENT_H__



//**************************************************
#endif

